package com.lkm.market2_0;

import java.io.FileDescriptor;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;


public class HoldService extends Service{

	public static void stop(Context c){
		c.stopService(new Intent(c, HoldService.class));
	}
	public static void start(Context c){
		c.startService(new Intent(c, HoldService.class));
	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		startForeground(Notice.class.hashCode()-1, Notice.ShowImNotificationApp(this));
		return super.onStartCommand(intent, flags, startId);
	}
	
	@Override
	public void onDestroy() {
		super.onDestroy();
		stopForeground(true);
	}
	
	@Override
	public IBinder onBind(Intent intent) {
		return new IBinder() {
			
			@Override
			public boolean unlinkToDeath(DeathRecipient recipient, int flags) {
				// TODO Auto-generated method stub
				return false;
			}
			
			@Override
			public boolean transact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
				// TODO Auto-generated method stub
				return false;
			}
			
			@Override
			public IInterface queryLocalInterface(String descriptor) {
				// TODO Auto-generated method stub
				return null;
			}
			
			@Override
			public boolean pingBinder() {
				// TODO Auto-generated method stub
				return false;
			}
			
			@Override
			public void linkToDeath(DeathRecipient recipient, int flags) throws RemoteException {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public boolean isBinderAlive() {
				// TODO Auto-generated method stub
				return false;
			}
			
			@Override
			public String getInterfaceDescriptor() throws RemoteException {
				// TODO Auto-generated method stub
				return null;
			}
			
			@Override
			public void dumpAsync(FileDescriptor fd, String[] args) throws RemoteException {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void dump(FileDescriptor fd, String[] args) throws RemoteException {
				// TODO Auto-generated method stub
				
			}
		};
	}

}
